/****************************************************************************
 *
 *   Copyright (c) 2020-2021 PX4 Development Team. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 * 3. Neither the name PX4 nor the names of its contributors may be
 *    used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 *
 ****************************************************************************/

#include <stdint.h>

static constexpr float SAMPLING_RES = 10;
static constexpr float SAMPLING_MIN_LAT = -90;
static constexpr float SAMPLING_MAX_LAT = 90;
static constexpr float SAMPLING_MIN_LON = -180;
static constexpr float SAMPLING_MAX_LON = 180;

static constexpr int LAT_DIM = 19;
static constexpr int LON_DIM = 37;


// *INDENT-OFF*
// Magnetic declination data in radians * 10^-4
// Model: WMM-2020,
// Version: 0.5.1.11,
// Date: 2021.5808,
static constexpr const int16_t declination_table[19][37] {
	//    LONGITUDE:   -180,  -170,  -160,  -150,  -140,  -130,  -120,  -110,  -100,   -90,   -80,   -70,   -60,   -50,   -40,   -30,   -20,   -10,     0,    10,    20,    30,    40,    50,    60,    70,    80,    90,   100,   110,   120,   130,   140,   150,   160,   170,   180,
	/* LAT: -90 */ {  26011, 24266, 22520, 20775, 19030, 17284, 15539, 13794, 12048, 10303,  8558,  6813,  5067,  3322,  1577,  -169, -1914, -3659, -5404, -7150, -8895,-10640,-12386,-14131,-15876,-17622,-19367,-21112,-22858,-24603,-26348,-28094,-29839, 31247, 29502, 27756, 26011, },
	/* LAT: -80 */ {  22580, 20445, 18502, 16726, 15084, 13544, 12080, 10668,  9292,  7941,  6609,  5290,  3981,  2676,  1369,    50, -1290, -2660, -4068, -5518, -7010, -8545,-10120,-11737,-13400,-15116,-16900,-18770,-20751,-22867,-25140,-27574,-30143, 30048, 27425, 24915, 22580, },
	/* LAT: -70 */ {  14968, 13572, 12449, 11490, 10625,  9796,  8957,  8071,  7120,  6101,  5031,  3937,  2851,  1794,   770,  -240, -1276, -2378, -3574, -4869, -6245, -7671, -9116,-10556,-11981,-13395,-14822,-16305,-17923,-19827,-22331,-26106, 30808, 24186, 19627, 16842, 14968, },
	/* LAT: -60 */ {   8386,  8147,  7873,  7606,  7358,  7109,  6805,  6377,  5765,  4949,  3950,  2838,  1716,   683,  -205,  -967, -1697, -2515, -3510, -4697, -6020, -7384, -8702, -9913,-10978,-11879,-12597,-13093,-13265,-12815,-10726, -3586,  4796,  7584,  8375,  8513,  8386, },
	/* LAT: -50 */ {   5458,  5498,  5447,  5362,  5294,  5261,  5230,  5107,  4768,  4110,  3105,  1835,   491,  -697, -1580, -2156, -2558, -2995, -3667, -4664, -5893, -7163, -8303, -9209, -9814,-10063, -9878, -9131, -7630, -5276, -2375,   371,  2479,  3903,  4777,  5252,  5458, },
	/* LAT: -40 */ {   3935,  4029,  4041,  4001,  3946,  3915,  3923,  3916,  3746,  3219,  2204,   768,  -798, -2123, -3002, -3468, -3662, -3728, -3887, -4431, -5384, -6452, -7340, -7889, -8009, -7646, -6769, -5391, -3677, -1968,  -504,   718,  1760,  2622,  3275,  3704,  3935, },
	/* LAT: -30 */ {   2967,  3054,  3089,  3080,  3027,  2952,  2895,  2863,  2739,  2269,  1245,  -266, -1875, -3141, -3897, -4256, -4349, -4154, -3723, -3477, -3807, -4542, -5246, -5610, -5500, -4926, -3975, -2767, -1550,  -597,    85,   686,  1307,  1905,  2410,  2769,  2967, },
	/* LAT: -20 */ {   2324,  2372,  2395,  2403,  2366,  2276,  2172,  2098,  1954,  1466,   422, -1057, -2540, -3615, -4166, -4298, -4109, -3567, -2711, -1898, -1594, -1930, -2578, -3057, -3106, -2757, -2126, -1307,  -523,   -26,   241,   544,   982,  1454,  1871,  2174,  2324, },
	/* LAT: -10 */ {   1930,  1926,  1910,  1914,  1892,  1812,  1707,  1620,  1437,   892,  -159, -1531, -2810, -3656, -3943, -3733, -3170, -2394, -1548,  -785,  -306,  -322,  -782, -1292, -1514, -1430, -1120,  -619,  -115,   132,   187,   349,   716,  1146,  1533,  1814,  1930, },
	/* LAT:   0 */ {   1718,  1686,  1636,  1633,  1628,  1564,  1466,  1357,  1105,   489,  -545, -1771, -2834, -3437, -3457, -2972, -2210, -1427,  -770,  -229,   189,   312,    43,  -373,  -634,  -693,  -595,  -331,   -36,    59,     3,    95,   431,   865,  1278,  1592,  1718, },
	/* LAT:  10 */ {   1585,  1594,  1557,  1578,  1609,  1565,  1451,  1270,   896,   180,  -838, -1917, -2754, -3110, -2923, -2328, -1554,  -838,  -317,    68,   395,   551,   397,    76,  -162,  -271,  -292,  -208,  -100,  -137,  -271,  -243,    55,   501,   976,  1378,  1585, },
	/* LAT:  20 */ {   1406,  1556,  1620,  1716,  1806,  1790,  1642,  1345,   803,   -53, -1097, -2054, -2664, -2787, -2472, -1876, -1167,  -514,   -48,   266,   527,   677,   592,   350,   148,    30,   -57,  -117,  -193,  -379,  -613,  -671,  -441,     1,   537,  1051,  1406, },
	/* LAT:  30 */ {   1113,  1481,  1742,  1968,  2130,  2144,  1961,  1543,   818,  -212, -1335, -2222, -2650, -2599, -2208, -1632,  -977,  -357,   110,   420,   654,   804,   789,   642,   491,   367,   215,    10,  -268,  -639, -1007, -1168, -1012,  -590,   -16,   592,  1113, },
	/* LAT:  40 */ {    765,  1353,  1847,  2239,  2489,  2534,  2321,  1790,   880,  -352, -1599, -2479, -2812, -2667, -2226, -1635,  -982,  -350,   164,   533,   807,  1009,  1108,  1100,  1023,   877,   614,   211,  -321,  -925, -1448, -1695, -1583, -1169,  -571,   104,   765, },
	/* LAT:  50 */ {    486,  1235,  1915,  2470,  2836,  2941,  2712,  2057,   913,  -594, -2030, -2958, -3261, -3074, -2586, -1941, -1230,  -529,    90,   600,  1022,  1382,  1667,  1841,  1863,  1680,  1244,   546,  -341, -1243, -1927, -2220, -2099, -1658, -1020,  -283,   486, },
	/* LAT:  60 */ {    306,  1162,  1967,  2660,  3160,  3369,  3150,  2331,   803, -1177, -2913, -3903, -4158, -3898, -3324, -2576, -1747,  -903,   -91,   664,  1360,  1994,  2542,  2943,  3109,  2932,  2307,  1205,  -201, -1525, -2403, -2720, -2557, -2060, -1359,  -550,   306, },
	/* LAT:  70 */ {    100,  1041,  1940,  2738,  3349,  3636,  3372,  2209,   -81, -2845, -4812, -5631, -5629, -5135, -4357, -3416, -2385, -1314,  -235,   829,  1858,  2828,  3700,  4413,  4868,  4912,  4322,  2875,   701, -1407, -2716, -3167, -3008, -2471, -1713,  -834,   100, },
	/* LAT:  80 */ {   -508,   418,  1274,  1969,  2351,  2147,   876, -1898, -5252, -7381, -8088, -7917, -7258, -6319, -5212, -4000, -2725, -1412,   -81,  1251,  2568,  3853,  5082,  6222,  7218,  7980,  8328,  7903,  6045,  2404, -1134, -2872, -3262, -2950, -2280, -1432,  -508, },
	/* LAT:  90 */ { -30201,-28456,-26711,-24965,-23220,-21474,-19729,-17984,-16238,-14493,-12748,-11003, -9257, -7512, -5767, -4022, -2277,  -532,  1214,  2959,  4704,  6449,  8195,  9940, 11685, 13430, 15176, 16921, 18667, 20412, 22158, 23903, 25648, 27394, 29139, 30885,-30201, },
};

// Magnetic inclination data in radians * 10^-4
// Model: WMM-2020,
// Version: 0.5.1.11,
// Date: 2021.5808,
static constexpr const int16_t inclination_table[19][37] {
	//    LONGITUDE:   -180,  -170,  -160,  -150,  -140,  -130,  -120,  -110,  -100,   -90,   -80,   -70,   -60,   -50,   -40,   -30,   -20,   -10,     0,    10,    20,    30,    40,    50,    60,    70,    80,    90,   100,   110,   120,   130,   140,   150,   160,   170,   180,
	/* LAT: -90 */ { -12578,-12578,-12578,-12578,-12578,-12577,-12577,-12577,-12577,-12577,-12577,-12577,-12577,-12577,-12577,-12577,-12577,-12577,-12577,-12577,-12577,-12577,-12577,-12577,-12577,-12577,-12577,-12577,-12578,-12578,-12578,-12578,-12578,-12578,-12578,-12578,-12578, },
	/* LAT: -80 */ { -13664,-13530,-13370,-13189,-12995,-12793,-12589,-12388,-12197,-12020,-11863,-11729,-11618,-11532,-11469,-11427,-11408,-11410,-11438,-11492,-11575,-11689,-11834,-12007,-12204,-12421,-12650,-12883,-13111,-13324,-13511,-13662,-13766,-13818,-13816,-13762,-13664, },
	/* LAT: -70 */ { -14114,-13795,-13476,-13153,-12820,-12476,-12120,-11762,-11418,-11108,-10854,-10669,-10556,-10503,-10489,-10494,-10503,-10514,-10538,-10594,-10702,-10875,-11120,-11432,-11804,-12220,-12668,-13131,-13597,-14050,-14469,-14816,-15008,-14957,-14727,-14429,-14114, },
	/* LAT: -60 */ { -13523,-13171,-12833,-12500,-12157,-11784,-11369,-10914,-10445,-10012, -9679, -9500, -9494, -9629, -9834,-10030,-10160,-10208,-10200,-10187,-10233,-10388,-10673,-11078,-11573,-12128,-12713,-13309,-13897,-14458,-14955,-15246,-15075,-14693,-14288,-13895,-13523, },
	/* LAT: -50 */ { -12498,-12157,-11827,-11506,-11182,-10836,-10436, -9964, -9433, -8909, -8514, -8382, -8576, -9033, -9598,-10114,-10482,-10654,-10633,-10487,-10344,-10345,-10558,-10967,-11505,-12095,-12682,-13222,-13670,-13970,-14079,-14006,-13804,-13521,-13193,-12846,-12498, },
	/* LAT: -40 */ { -11240,-10894,-10548,-10204, -9865, -9526, -9164, -8737, -8215, -7647, -7215, -7162, -7610, -8428, -9351,-10185,-10851,-11297,-11450,-11295,-10958,-10681,-10663,-10935,-11392,-11896,-12345,-12671,-12833,-12839,-12749,-12611,-12430,-12198,-11912,-11585,-11240, },
	/* LAT: -30 */ {  -9601, -9226, -8850, -8462, -8069, -7692, -7334, -6940, -6426, -5813, -5353, -5419, -6171, -7365, -8617, -9719,-10640,-11360,-11775,-11782,-11421,-10914,-10572,-10562,-10808,-11129,-11389,-11508,-11448,-11272,-11096,-10958,-10810,-10601,-10320, -9976, -9601, },
	/* LAT: -20 */ {  -7370, -6936, -6524, -6098, -5654, -5222, -4828, -4411, -3842, -3154, -2696, -2935, -4023, -5624, -7256, -8635, -9713,-10500,-10953,-11003,-10652,-10044, -9483, -9231, -9274, -9435, -9579, -9601, -9431, -9158, -8961, -8869, -8760, -8549, -8233, -7823, -7370, },
	/* LAT: -10 */ {  -4412, -3886, -3440, -3007, -2550, -2098, -1680, -1219,  -587,   122,   496,    92, -1212, -3117, -5097, -6721, -7835, -8484, -8761, -8710, -8313, -7637, -6972, -6620, -6577, -6669, -6789, -6816, -6630, -6333, -6173, -6174, -6126, -5905, -5522, -4998, -4412, },
	/* LAT:   0 */ {   -903,  -291,   165,   564,   981,  1399,  1793,  2244,  2837,  3422,  3637,  3161,  1887,   -10, -2056, -3724, -4754, -5198, -5267, -5105, -4675, -3969, -3264, -2887, -2825, -2896, -3023, -3098, -2969, -2732, -2671, -2804, -2855, -2663, -2240, -1615,  -903, },
	/* LAT:  10 */ {   2565,  3180,  3607,  3944,  4298,  4665,  5021,  5416,  5876,  6254,  6300,  5826,  4760,  3206,  1514,   125,  -698,  -960,  -878,  -648,  -244,   386,  1019,  1360,  1422,  1374,  1271,  1180,  1223,  1329,  1260,  1004,   823,   901,  1252,  1850,  2565, },
	/* LAT:  20 */ {   5418,  5939,  6313,  6606,  6918,  7262,  7609,  7962,  8303,  8509,  8429,  7977,  7151,  6062,  4935,  4017,  3476,  3346,  3489,  3728,  4054,  4514,  4974,  5230,  5285,  5264,  5213,  5157,  5147,  5132,  4964,  4639,  4350,  4264,  4435,  4854,  5418, },
	/* LAT:  30 */ {   7569,  7939,  8253,  8535,  8843,  9192,  9552,  9897, 10179, 10298, 10159,  9743,  9119,  8409,  7747,  7230,  6932,  6883,  7020,  7228,  7472,  7768,  8055,  8229,  8285,  8294,  8294,  8285,  8265,  8186,  7968,  7621,  7270,  7053,  7036,  7229,  7569, },
	/* LAT:  40 */ {   9266,  9485,  9741, 10026, 10353, 10715, 11085, 11427, 11683, 11769, 11623, 11266, 10794, 10320,  9922,  9635,  9482,  9473,  9580,  9739,  9912, 10094, 10265, 10390, 10467, 10525, 10578, 10611, 10596, 10489, 10251,  9904,  9539,  9255,  9112,  9124,  9266, },
	/* LAT:  50 */ {  10801, 10923, 11125, 11395, 11719, 12075, 12431, 12750, 12974, 13036, 12898, 12601, 12236, 11889, 11612, 11423, 11327, 11321, 11384, 11485, 11597, 11712, 11827, 11942, 12060, 12180, 12293, 12365, 12359, 12237, 11994, 11667, 11329, 11044, 10854, 10774, 10801, },
	/* LAT:  60 */ {  12318, 12393, 12545, 12764, 13036, 13338, 13642, 13910, 14087, 14115, 13979, 13729, 13439, 13166, 12944, 12786, 12693, 12660, 12674, 12720, 12787, 12870, 12975, 13106, 13264, 13439, 13603, 13714, 13722, 13605, 13382, 13104, 12825, 12587, 12417, 12326, 12318, },
	/* LAT:  70 */ {  13759, 13803, 13900, 14044, 14225, 14431, 14640, 14823, 14927, 14905, 14766, 14562, 14343, 14138, 13964, 13828, 13733, 13677, 13657, 13669, 13710, 13781, 13883, 14018, 14184, 14371, 14555, 14697, 14745, 14675, 14515, 14317, 14122, 13957, 13837, 13770, 13759, },
	/* LAT:  80 */ {  15001, 15015, 15054, 15115, 15194, 15280, 15361, 15405, 15384, 15301, 15186, 15060, 14936, 14822, 14722, 14639, 14577, 14536, 14517, 14520, 14546, 14595, 14666, 14758, 14869, 14995, 15130, 15261, 15368, 15414, 15378, 15294, 15200, 15116, 15053, 15014, 15001, },
	/* LAT:  90 */ {  15392, 15392, 15392, 15392, 15392, 15392, 15392, 15392, 15392, 15392, 15392, 15392, 15392, 15392, 15392, 15392, 15392, 15392, 15392, 15392, 15392, 15392, 15392, 15392, 15392, 15392, 15392, 15392, 15392, 15392, 15392, 15392, 15392, 15392, 15392, 15392, 15392, },
};

// Magnetic strength data in milli-Gauss * 10
// Model: WMM-2020,
// Version: 0.5.1.11,
// Date: 2021.5808,
static constexpr const int16_t strength_table[19][37] {
	//    LONGITUDE:  -180, -170, -160, -150, -140, -130, -120, -110, -100,  -90,  -80,  -70,  -60,  -50,  -40,  -30,  -20,  -10,    0,   10,   20,   30,   40,   50,   60,   70,   80,   90,  100,  110,  120,  130,  140,  150,  160,  170,  180,
	/* LAT: -90 */ {  5457, 5457, 5457, 5457, 5457, 5457, 5457, 5457, 5457, 5457, 5457, 5457, 5457, 5457, 5457, 5457, 5457, 5457, 5457, 5457, 5457, 5457, 5457, 5457, 5457, 5457, 5457, 5457, 5457, 5457, 5457, 5457, 5457, 5457, 5457, 5457, 5457, },
	/* LAT: -80 */ {  6063, 6000, 5922, 5831, 5728, 5617, 5499, 5377, 5255, 5135, 5021, 4915, 4821, 4741, 4678, 4633, 4608, 4606, 4626, 4672, 4742, 4835, 4950, 5081, 5224, 5374, 5523, 5666, 5798, 5911, 6004, 6073, 6118, 6138, 6134, 6109, 6063, },
	/* LAT: -70 */ {  6308, 6176, 6027, 5863, 5685, 5493, 5288, 5073, 4854, 4639, 4436, 4253, 4094, 3963, 3859, 3782, 3734, 3721, 3749, 3824, 3951, 4130, 4357, 4624, 4918, 5225, 5529, 5812, 6062, 6267, 6418, 6515, 6557, 6550, 6502, 6418, 6308, },
	/* LAT: -60 */ {  6193, 6002, 5802, 5594, 5376, 5142, 4886, 4607, 4315, 4025, 3757, 3529, 3348, 3213, 3114, 3040, 2990, 2969, 2995, 3084, 3250, 3500, 3825, 4209, 4631, 5064, 5486, 5870, 6195, 6445, 6609, 6689, 6692, 6630, 6517, 6367, 6193, },
	/* LAT: -50 */ {  5849, 5620, 5389, 5159, 4928, 4684, 4413, 4110, 3782, 3449, 3147, 2905, 2743, 2650, 2602, 2568, 2535, 2510, 2514, 2585, 2756, 3043, 3436, 3905, 4411, 4917, 5392, 5812, 6152, 6394, 6534, 6576, 6534, 6425, 6264, 6067, 5849, },
	/* LAT: -40 */ {  5397, 5152, 4908, 4669, 4436, 4199, 3945, 3661, 3347, 3021, 2722, 2498, 2379, 2352, 2371, 2394, 2400, 2389, 2378, 2405, 2532, 2802, 3215, 3726, 4272, 4797, 5266, 5655, 5949, 6137, 6226, 6230, 6162, 6032, 5851, 5634, 5397, },
	/* LAT: -30 */ {  4880, 4641, 4403, 4170, 3944, 3725, 3507, 3276, 3021, 2745, 2487, 2303, 2231, 2254, 2321, 2393, 2460, 2512, 2536, 2549, 2613, 2806, 3162, 3646, 4176, 4675, 5096, 5415, 5620, 5720, 5748, 5721, 5642, 5511, 5332, 5116, 4880, },
	/* LAT: -20 */ {  4322, 4111, 3904, 3700, 3504, 3321, 3153, 2990, 2813, 2616, 2425, 2290, 2246, 2286, 2375, 2485, 2614, 2744, 2836, 2874, 2898, 2989, 3223, 3602, 4050, 4478, 4829, 5068, 5175, 5183, 5153, 5106, 5024, 4897, 4731, 4534, 4322, },
	/* LAT: -10 */ {  3791, 3631, 3479, 3334, 3198, 3078, 2975, 2884, 2788, 2675, 2553, 2453, 2404, 2425, 2509, 2637, 2793, 2953, 3080, 3145, 3160, 3184, 3303, 3550, 3874, 4196, 4463, 4628, 4666, 4614, 4547, 4483, 4393, 4269, 4120, 3957, 3791, },
	/* LAT:   0 */ {  3412, 3320, 3237, 3165, 3110, 3072, 3047, 3030, 3007, 2960, 2882, 2787, 2704, 2669, 2708, 2809, 2941, 3077, 3194, 3271, 3303, 3324, 3396, 3550, 3757, 3970, 4151, 4259, 4267, 4200, 4112, 4019, 3907, 3776, 3642, 3519, 3412, },
	/* LAT:  10 */ {  3283, 3253, 3233, 3230, 3255, 3303, 3360, 3415, 3452, 3443, 3375, 3260, 3132, 3034, 3004, 3043, 3123, 3221, 3321, 3407, 3471, 3533, 3619, 3736, 3869, 4007, 4126, 4198, 4202, 4141, 4032, 3889, 3728, 3569, 3434, 3338, 3283, },
	/* LAT:  20 */ {  3400, 3404, 3431, 3486, 3579, 3701, 3831, 3950, 4033, 4046, 3973, 3831, 3662, 3520, 3440, 3426, 3459, 3531, 3626, 3723, 3813, 3911, 4021, 4132, 4239, 4350, 4451, 4518, 4530, 4473, 4337, 4136, 3909, 3700, 3538, 3438, 3400, },
	/* LAT:  30 */ {  3723, 3732, 3788, 3889, 4033, 4206, 4382, 4540, 4649, 4676, 4603, 4447, 4256, 4089, 3981, 3932, 3934, 3983, 4068, 4166, 4262, 4367, 4483, 4600, 4719, 4845, 4964, 5051, 5079, 5023, 4868, 4630, 4356, 4102, 3903, 3776, 3723, },
	/* LAT:  40 */ {  4222, 4223, 4290, 4416, 4584, 4773, 4957, 5114, 5219, 5245, 5177, 5027, 4838, 4661, 4531, 4453, 4425, 4445, 4504, 4582, 4668, 4764, 4878, 5012, 5162, 5323, 5474, 5584, 5625, 5573, 5419, 5182, 4908, 4649, 4438, 4294, 4222, },
	/* LAT:  50 */ {  4832, 4827, 4886, 4998, 5146, 5306, 5456, 5577, 5650, 5659, 5594, 5466, 5302, 5136, 4997, 4898, 4842, 4828, 4851, 4900, 4969, 5059, 5177, 5327, 5502, 5686, 5853, 5972, 6018, 5976, 5846, 5650, 5425, 5208, 5028, 4900, 4832, },
	/* LAT:  60 */ {  5392, 5382, 5413, 5478, 5566, 5660, 5747, 5812, 5844, 5834, 5779, 5684, 5562, 5432, 5312, 5215, 5147, 5112, 5109, 5136, 5192, 5277, 5395, 5541, 5708, 5876, 6024, 6130, 6176, 6154, 6072, 5945, 5798, 5655, 5532, 5443, 5392, },
	/* LAT:  70 */ {  5726, 5708, 5707, 5721, 5744, 5770, 5794, 5807, 5806, 5786, 5745, 5687, 5615, 5538, 5464, 5399, 5350, 5322, 5316, 5336, 5380, 5449, 5540, 5649, 5766, 5881, 5981, 6054, 6094, 6098, 6069, 6016, 5948, 5878, 5813, 5761, 5726, },
	/* LAT:  80 */ {  5789, 5772, 5758, 5747, 5737, 5728, 5718, 5706, 5691, 5672, 5649, 5623, 5596, 5568, 5542, 5522, 5508, 5502, 5506, 5521, 5547, 5582, 5625, 5672, 5722, 5770, 5813, 5848, 5872, 5886, 5888, 5882, 5868, 5849, 5829, 5808, 5789, },
	/* LAT:  90 */ {  5679, 5679, 5679, 5679, 5679, 5679, 5679, 5679, 5679, 5679, 5679, 5679, 5679, 5679, 5679, 5679, 5679, 5679, 5679, 5679, 5679, 5679, 5679, 5679, 5679, 5679, 5679, 5679, 5679, 5679, 5679, 5679, 5679, 5679, 5679, 5679, 5679, },
};
